extends layout

block content
  .panel.error-box(class=status ? 'panel-danger' : 'panel-success')
    .panel-hd.error-title: h3= status ? '错误' : '信息'
    .panel-bd
      p= message
      - if(jump)
        a#jump.jump(href=jump) 页面将在<span id="second"></span>秒后跳转
      
block script
  - if(jump)
    script
      :uglify
        var second = 3;
        var $second = $('#second').text(second);
        var timeId = setInterval(function () {
          --second;
          if(second <= 0) {
            top.location.href = $('#jump').attr('href');
          }else {
            $second.text(second);
          }
        }, 1000);